package com.cskaoyan.service;

import com.cskaoyan.bean.*;
import org.springframework.web.multipart.MultipartFile;

import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by Enzo Cotter on 2020/10/3.
 */
public interface AdminService {
    ListBean queryAdminListBean(String username, Integer page, Integer limit, String sort, String order);


    Integer addAdmin(Admin admin);

    ListBean queryStorage(String name, String key, Integer page, Integer limit, String sort, String order);

    int addStorage(Storage storage);

    int updateStorageName(Integer id, String name, Date date);

    int deleteStorageName(Integer id);

    List<RoleList> queryRole();

    int updateAdmin(Admin admin,Date date);

    int deleteAdmin(Integer id);

    ListBean queryLogListBean(String name, Integer page, Integer limit, String sort, String order);

    ListBean queryRoleByInfo(String name, Integer page, Integer limit, String sort, String order);

    int addRoleByName(Role role);

    int updateRole(Role role, Date date);

    int deleteRole(Integer id);

    //根据字段查询
    List<Admin> queryFiledByUsername(String username,String fileds);

    List<String> selectPermissionByUsername(String username);


    Integer updatePermissionsByRoleId(PermissionUpdateBean_empower permission);

    Map<String, Object> getPermissions(String roleId);

}
